package com.excetop.xservlet.req.param;

import java.sql.Timestamp;

/**
 * Timestamp 参数
 * @author xuZW
 *
 */
public class TimestampParam extends LongParam {

	private Timestamp timestampValue;
	
	private Timestamp[] timestampValueArray;

	public TimestampParam() {
	}
	
	public TimestampParam(String name, String[] textValueArray) {
		this(name, textValueArray, null);
	}
	
	public TimestampParam(String name, String[] textValueArray, String[] patternArray) {
		super(name, textValueArray, patternArray);
		setType(TYPE_TIMESTAMP);
		long[] longValueArray = getLongValueArray();
		if(null != longValueArray && longValueArray.length > 0){
			timestampValueArray = new Timestamp[longValueArray.length];
			for (int i = 0; i < longValueArray.length; i++) {
				timestampValueArray[i] = new Timestamp(longValueArray[i]);
			}
		}
		if(null != timestampValueArray && timestampValueArray.length > 0){
			timestampValue = timestampValueArray[0];
		}
	}
	
	public Timestamp getTimestampValue() {
		return timestampValue;
	}

	public void setTimestampValue(Timestamp timestampValue) {
		this.timestampValue = timestampValue;
	}

	public Timestamp[] getTimestampValueArray() {
		return timestampValueArray;
	}

	public void setTimestampValueArray(Timestamp[] timestampValueArray) {
		this.timestampValueArray = timestampValueArray;
	}
	
	@Override
	public boolean verifying() {
		boolean result = true;
		// TODO Auto-generated method stub
		return result;
	}
	
}
